/*
	File:		IAudio.h
	Author:		dmonroe
	Date:		11/10/2012
	Copyright:	Full Sail University

	Purpose:	Interface class for audio implementations
*/

#ifndef IAUDIO_H
#define IAUDIO_H


// Uses SGD::CHandle for referencing assets
#include "../source/SGD_Handle.h"


class IAudio
{
public:
	// SINGLETON
	static IAudio*		GetInstance		( void );
	static void			DeleteInstance	( void );

	// SETUP
	virtual	bool		Initialize		( void )	= 0;
	virtual	bool		Terminate		( void )	= 0;
	
	// FRAME UPDATE
	virtual bool		Update			( void )	= 0;


	// SYSTEM TYPES
	enum EAudioGroup	{ EAG_MUSIC, EAG_SFX, EAG_BOTH	};

	// AUDIO
	virtual HAudio		LoadAudio		( const char* filename )	= 0;
	virtual bool		UnloadAudio		( HAudio handle )			= 0;

	virtual bool		Play			( HAudio handle,		bool looping = false )	= 0;
	virtual bool		IsPlaying		( HAudio handle )								= 0;
	virtual bool		Pause			( HAudio handle,		bool pause = true )		= 0;
	virtual bool		PauseAll		( EAudioGroup group )							= 0;

	virtual bool		SetVolume		( HAudio handle,		float volume )			= 0;
	virtual float		GetVolume		( HAudio handle )								= 0;
	virtual bool		SetMasterVolume	( EAudioGroup group,	float volume )			= 0;
	virtual float		GetMasterVolume	( EAudioGroup group )							= 0;
	
protected:
	IAudio				( void )				// Default constructor
		{	/* do nothing*/		}
	virtual	~IAudio		( void )				// Destructor
		{	/* do nothing*/		}

private:
	IAudio				( const IAudio& );		// Copy constructor
	IAudio&	operator=	( const IAudio& );		// Assignment operator

};

#endif //IAUDIO_H
